package com.songlanyun.modules.order.model.vo;

import com.songlanyun.common.drive.ValueObject;
import com.songlanyun.common.enums.GoodsConstant;
import com.songlanyun.modules.order.model.dto.SubmitOrderUseCoupon;
import com.songlanyun.modules.shop.entity.ShopEntity;
import com.songlanyun.modules.useraddress.entity.UserAddress;
import lombok.Data;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;

/**
 * 下单前的订单页数据(这样设置为了可以分单)
 */
@Data
public class SubmitOrderVo implements ValueObject
{
    /**
     * 订单类型
     */
    private Integer orderType = 1;
    /**
     * 订单来源渠道类型
     */
    private Integer chanelType;

    /**
     * 是不是积分订单
     */
    private Boolean pointGoods = false;

    //用户id
    private Long userId;

    //活动类型营销活动内类型(0无活动，1秒杀，2拼团）
    private Integer marketingType = 0;

    //是否来源于购物车
    private Boolean isCart;

    //如果是购物车中选择多店的商品那么(出货方式只能是物流,不能是自提)
    //出货方式（0物流，1自提,2预约）
    private Integer shipmentMode = 0;

    //是否能选自提
    private Boolean isAbleSelectSelfTake=false;

    //多店数据
    private List<SubmitShopOrderVo> shopOrders;

    //合单总价
    private BigDecimal totalMoney;

    //合单总价(不含运费)
    private BigDecimal totalMoneyNoFreight;

    //不含运费，扣出首单，扣除店铺优惠券的费用(用来选择平台券时使用)
    private BigDecimal totalAmountDecShopCoupon;


    //总优惠多少钱
    private BigDecimal totalReduced;

    //总积分
    private BigDecimal totalPoint = BigDecimal.ZERO;

    /**
     * 积分（可用积分）（公益积分）
     */
    private BigDecimal integralAble = BigDecimal.ZERO;

    //收货地址
    private SubmitOrderReceiptVo receipt;

    //自提信息
    private SubmitOrderSelfTakeVo selfTake;

    //服务订单联系人
    private SubmitServiceOrderContactsVo serviceContacts;

    //自提店铺
    private ShopEntity selfTakeShop;

    private Boolean pointEnough= false;

    //是否是服务体系商品
    private Boolean serviceSystemGoods = false;

    //是否存在平台店
    private Boolean hasPlatform = false;

    /**
     * 商品分区特征(0,普通商品,1服务体系礼包,2新人福利区,3公益申领)
     */
    private GoodsConstant.AreaFeature areaFeature;

    /**
     * 平台券
     */
    private SubmitOrderUseCoupon platformCoupon = SubmitOrderUseCoupon.buildEmpty();

    /**
     * 随机立减
     */
    private  BigDecimal randomReduction;
}
